﻿<?xml version="1.0" encoding="utf-8" ?>

<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="MSH.Common.Business" assembly="Common">

  <class name="UserProfile" table="UserProfile">

  <id name="ID">
    <generator class="native">
      <param name="sequence">SeqUserProfileID</param>
    </generator>

  </id>

  <property name="MobilePhoneNumber">
    <column name="MobilePhoneNumber" length="30" not-null="true" index="IdxUserProfileMobilePhoneNumber"    />
  </property>

  <property name="FirstName">
    <column name="FirstName" length="30" not-null="false"  />
  </property>

  <property name="SurName">
    <column name="Surname" length="30" not-null="false"  />
  </property>

  <property name="Address">
    <column name="Address" length="30" not-null="false"  />
  </property>

  <property name="Zipcode">
    <column name="Zipcode" length="30" not-null="false"  />
  </property>

  <property name="City">
    <column name="City" length="30" not-null="false"  />
  </property>

  <property name="Sex">
    <column name="Sex" length="1" not-null="false"  />
  </property>

  <property name="DateOfBirth">
    <column name="DateOfBirth" not-null="false"  />
  </property>

  <property name="Website">
    <column name="Website" length="30" not-null="false"  />
  </property>



</class>

  <database-object>
    <create>
      CREATE INDEX IDXUSERPROFILESEARCH1 ON USERPROFILE COMPUTED BY (UPPER (CITY));
    </create>
    <drop>
      DROP INDEX IDXUSERPROFILESEARCH1;
    </drop>
    <dialect-scope name="NHibernate.Dialect.FirebirdDialect"/>

  </database-object>

  <database-object>
    <create>
      CREATE INDEX IDXUSERPROFILESEARCH2 ON USERPROFILE COMPUTED BY (UPPER (SURNAME));
    </create>
    <drop>
      DROP INDEX IDXUSERPROFILESEARCH2;
    </drop>
    <dialect-scope name="NHibernate.Dialect.FirebirdDialect"/>

  </database-object>

  <database-object>
    <create>
      CREATE INDEX IDXUSERPROFILESEARCH3 ON USERPROFILE COMPUTED BY (UPPER (FIRSTNAME));
    </create>
    <drop>
      DROP INDEX IDXUSERPROFILESEARCH3;
    </drop>
    <dialect-scope name="NHibernate.Dialect.FirebirdDialect"/>

  </database-object>


</hibernate-mapping>

